<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		
		<meta name="Description" content="" />
        <meta name="Keywords" content="" />
        
		<title>XSLT Templater - test</title>
		
		<link href="style.css" rel="stylesheet" type="text/css" />
		
		<script type="text/javascript" src="/jQuery-1.4.2.js"></script>
		<script type="text/javascript" src="/jquery.xslt.yui.js"></script>
		<script type="text/javascript">
		
			// Two requests of xml/xsl for ALL calling
			window.elements = 10;
		
			$(document).ready(function() {
			
				var time = new Date();
				
				var cache = {
							"xml":true,
							"xsl":false
						}
				
				// Emulate hierarchy
				function load(i) {
					if (i == window.elements) {
						var time2 = new Date();
						$("#time").text("Calculating time:"+(time2-time));
					} else {
						$('#test'+i).xslt("/tests/data/message.xml","/tests/xslt/message-template.xsl",function(){
							load(++i);	
						},null,cache);
					}
    			}
    			load(0);
    			
			});
				
		</script>
		
	</head>

	<body>
	
		<img src="/XSLTTemplater.png" alt="XSLT Templater"/>
		
		<script type="text/javascript">
			for (var i=0;i<window.elements;i++) {
				document.write('<div id="test'+i+'" class="xsltConteiner"></div>');
			}
		</script>
		
		<span id="time"></span>
		
	</body>
</html>